/**
 * 
 * 起迪科技 Copyright (c) 2014-2018 QiDi,Inc.All Rights Reserved.
 */
package cn.qidisoft.edu.hzjt.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.qidisoft.core.common.code.QdfRespCode;
import cn.qidisoft.core.common.exception.dao.DBException;
import cn.qidisoft.edu.hzjt.dao.ProjectMaterialFilepathMapper;
import cn.qidisoft.edu.hzjt.model.ProjectMaterialFilepath;
import cn.qidisoft.edu.hzjt.service.IProjectMaterialFilepathService;

/**
 * 
 * 
 * @author Administrator
 * @version $Id: CatalogServiceImpl.java, v 0.1 2018年9月28日 上午9:17:27 Administrator hhl $
 */
@Service("projectMaterialFilepathService")
public class ProjectMaterialFilepathServiceImpl implements IProjectMaterialFilepathService {
    @Autowired
    private ProjectMaterialFilepathMapper projectMaterialFilepathMapper;

    /** 
     * @see cn.qidisoft.microClass.resource.service.INoticeNewsFilepathService#queryList(cn.qidisoft.microClass.resource.model.NoticeNewsFilepath)
     */
    @Override
    public List<ProjectMaterialFilepath> queryList(ProjectMaterialFilepath projectMaterialFilepath) {
        try {
            return projectMaterialFilepathMapper.queryList(projectMaterialFilepath);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DBException(QdfRespCode.QDF_020004.getCode(), QdfRespCode.QDF_020004.getMsg(),
                e);
        }
    }

    /** 
     * @see cn.qidisoft.microClass.resource.service.INoticeNewsFilepathService#queryByPK(cn.qidisoft.microClass.resource.model.NoticeNewsFilepath)
     */
    @Override
    public ProjectMaterialFilepath queryByPK(ProjectMaterialFilepath projectMaterialFilepath) {
        try {
            return projectMaterialFilepathMapper.queryByPK(projectMaterialFilepath);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DBException(QdfRespCode.QDF_020004.getCode(), QdfRespCode.QDF_020004.getMsg(),
                e);
        }
    }

    /** 
     * @see cn.qidisoft.microClass.resource.service.INoticeNewsFilepathService#add(cn.qidisoft.microClass.resource.model.NoticeNewsFilepath)
     */
    @Override
    @Transactional
    public void add(ProjectMaterialFilepath projectMaterialFilepath) {
        try {
            projectMaterialFilepathMapper.add(projectMaterialFilepath);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DBException(QdfRespCode.QDF_020004.getCode(), QdfRespCode.QDF_020004.getMsg(),
                e);
        }
    }

    /** 
     * @see cn.qidisoft.microClass.resource.service.INoticeNewsFilepathService#update(cn.qidisoft.microClass.resource.model.NoticeNewsFilepath)
     */
    @Override
    @Transactional
    public void update(ProjectMaterialFilepath projectMaterialFilepath) {
        try {
            projectMaterialFilepathMapper.update(projectMaterialFilepath);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DBException(QdfRespCode.QDF_020004.getCode(), QdfRespCode.QDF_020004.getMsg(),
                e);
        }
    }

    /** 
     * @see cn.qidisoft.microClass.resource.service.INoticeNewsFilepathService#delete(cn.qidisoft.microClass.resource.model.NoticeNewsFilepath)
     */
    @Override
    @Transactional
    public void delete(ProjectMaterialFilepath projectMaterialFilepath) {
        try {
            projectMaterialFilepathMapper.delete(projectMaterialFilepath);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DBException(QdfRespCode.QDF_020004.getCode(), QdfRespCode.QDF_020004.getMsg(),
                e);
        }
    }

}
